#pragma once
#include<functional>
#include<iostream>
using task_t = std::function<void()>;

void Download()
{
    std::cout << "我是一个下载任务..." << std::endl;
    sleep(3); // 假设处理任务比较耗时
}

class Task
{
public:
    Task(){}
    Task(int x,int y):_x(x),_y(y)
    {
    }
    void Execute()
    {
        _sum=_x+_y;
    }
    int sum()
    {
        return _sum;
    }
private:
    int _x;
    int _y;
    int _sum;
};